home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 38
/
Amiga Format CD38 (1999-03-15)(Future Publishing)(GB)(Track 1 of 3)[!][issue 1999-04].iso
/
-seriously_amiga-
/
misc
/
ced_html
/
html
/
html_bar.ced
< prev
next >
Wrap
Text File
|
1999-01-25
|
4KB
|
123 lines
/*
** html_bar.ced
**
** $VER: html_bar.ced 1.4 (01.03.1999)
**
** Arexx script for HTML v3.2 horizontal bar
**
** This script works with CygnusEd Professional v4.2
**
** Copyright © Eric BELLE
*/
/*
**------------------------------------------------------------------------------
** Initialisation
**------------------------------------------------------------------------------
*/
OPTIONS RESULTS /* Tell CygnusEd to return results. */
NL = '0A'X /* Alias for new line. */
KRETURN = RAWKEY 68 /* Shortcut to the return key. */
KTAB = RAWKEY 66 /* Shortcut to the tab key. */
STATUS TABSARESPACES /* Return TAB mode ("tab" or "space"). */
IF RESULT = 1 /* Test the TAB mode. */
THEN "TABS = SPACES" /* Switch TAB mode from "space" to "tab". */
ELSE NOP /* No operation. */
TAB SIZE 1 /* Set TAB size proportional to 2 spaces. */
/*
**------------------------------------------------------------------------------
** Horizontal bar width
**------------------------------------------------------------------------------
*/
GETSTRING "100%" '"Bar width (pixels or browser window %)?"'
BarWidth = RESULT
IF (BarWidth="RESULT" | BarWidth=" ")
THEN EXIT 0
ELSE NOP
/*
**------------------------------------------------------------------------------
** Horizontal bar height
**------------------------------------------------------------------------------
*/
GETSTRING "2" '"Bar height in pixels (standard = 2)?"'
BarHeight = RESULT
IF (BarHeight="RESULT" | BarHeight=" ")
THEN EXIT 0
ELSE NOP
/*
**------------------------------------------------------------------------------
** Horizontal bar position
**------------------------------------------------------------------------------
*/
BarPositionMode = "q"
DO WHILE ~(BarPositionMode="l" | BarPositionMode="c" | BarPositionMode="r",
| BarPositionMode=" " | BarPositionMode="RESULT")
GETSTRING "c" '"Bar position: (l)eft, (c)enter, (r)ight?"'
BarPositionMode = RESULT
END
IF (BarPositionMode="RESULT" | BarPositionMode=" ")
THEN EXIT 0
ELSE NOP
/*
**------------------------------------------------------------------------------
** horizontal bar shade
**------------------------------------------------------------------------------
*/
BarShadeMode = "q"
DO WHILE ~(BarShadeMode="y" | BarShadeMode="n",
| BarShadeMode="RESULT" | BarShadeMode=" ")
GETSTRING "y" '"Bar shade mode: (y)es, (n)o?"'
BarShadeMode = RESULT
END
IF (BarShadeMode="RESULT" | BarShadeMode=" ")
THEN EXIT 0
ELSE NOP
/*
**------------------------------------------------------------------------------
** Html horizontal bar marks
**------------------------------------------------------------------------------
*/
SELECT
WHEN (BarPositionMode="c") THEN BarPosition = ""
WHEN (BarPositionMode="r") THEN BarPosition = " ALIGN=RIGHT"
WHEN (BarPositionMode="l") THEN BarPosition = " ALIGN=LEFT"
OTHERWISE NOP
END
SELECT
WHEN (BarShadeMode="y") THEN BarShade = ">"
WHEN (BarShadeMode="n") THEN BarShade = " NOSHADE>"
OTHERWISE NOP
END
/*
**------------------------------------------------------------------------------
** Html horizontal bar structure
**------------------------------------------------------------------------------
*/
TEXT "<HR WIDTH=" || BarWidth || " SIZE=" || BarHeight || BarPosition || BarShade
/*
**------------------------------------------------------------------------------
** End of html_bar.ced Arexx script
**------------------------------------------------------------------------------
*/
EXIT 0